package zy.blue7.im.handler.impl;

import io.netty.channel.Channel;
import zy.blue7.im.ClientContainer;
import zy.blue7.im.common.message.response.Result;
import zy.blue7.im.gui.ChatIndexFrame;
import zy.blue7.im.gui.LoginFrame;
import zy.blue7.im.handler.ResultMessageHandler;

import java.awt.*;

/**
 * @author blue7
 * @version 1.0
 * @date 2022/3/4 9:40
 */
public class LoginResponseHandlerImpl implements ResultMessageHandler<String> {

    @Override
    public void handle(Channel channel, Result<String> result, Container container) {
        /**
         * 销毁 登录界面，创建聊天界面
         */
        LoginFrame.close();
        ChatIndexFrame.start();

    }
}
